-- GENERATED SPELL FOR [Reanimated Crusader] --


function spell0_31043(pUnit, Event) --@Avenger\'s Shield,n/a--
pUnit:FullCastSpellOnTarget(32674,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31043', 7000, 1)
end

function spell1_31043(pUnit, Event) --@Hammer of Injustice,n/a--
pUnit:FullCastSpellOnTarget(58154,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31043', 6322, 1)
end

function spell2_31043(pUnit, Event) --@Unholy Light,Heal--
pUnit:FullCastSpellOnTarget(58153,pUnit)
pUnit:RegisterEvent('Sorts_31043', 2500, 1)
end

function Sorts_31043(pUnit, Event)
local choix_sorts_31043 = math.random(0, 2)
if choix_sorts_31043 == 0 then
pUnit:RegisterEvent('spell0_31043', 1, 1)
end
if choix_sorts_31043 == 1 then
pUnit:RegisterEvent('spell1_31043', 1, 1)
end
if choix_sorts_31043 == 2 then
pUnit:RegisterEvent('spell2_31043', 1, 1)
end
end

function mob31043_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_31043', math.random(1500, 3000), 1)
end

function mob31043_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31043_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31043_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(31043, 1, 'mob31043_Action')
RegisterUnitEvent(31043, 2, 'mob31043_Leave')
RegisterUnitEvent(31043, 3, 'mob31043_Kill')
RegisterUnitEvent(31043, 4, 'mob31043_Die')
